package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcRepresentante generated by hbm2java
 */
@Entity
@Table(name = "RC_REPRESENTANTE", schema = "RUC")
@SequenceGenerator(name="SEQ_RC_REPRESENTANTE" , sequenceName="SEQ_RC_REPRESENTANTE")
public class RcRepresentante implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 837811097420095472L;
	private Long ircRepresentante;
	private RcRuc rcRucByNit;
	private RcRuc rcRucByNitRepresentante;
	private TbRepresentante tbRepresentante;
	private String cusuario;
	private Date firepresentante;
	private Date ffrepresentante;
	private Date fhingreso;
	private String nfolio;
	private String cdocAcredita;
	private String ndocAcredita;
	private String cdocIdentidad;
	private String ndocIdentidad;

	public RcRepresentante() {
	}

	public RcRepresentante(Long ircRepresentante, RcRuc rcRucByNit,
			RcRuc rcRucByNitRepresentante, TbRepresentante tbRepresentante,
			String cusuario, Date firepresentante, Date fhingreso) {
		this.ircRepresentante = ircRepresentante;
		this.rcRucByNit = rcRucByNit;
		this.rcRucByNitRepresentante = rcRucByNitRepresentante;
		this.tbRepresentante = tbRepresentante;
		this.cusuario = cusuario;
		this.firepresentante = firepresentante;
		this.fhingreso = fhingreso;
	}

	public RcRepresentante(Long ircRepresentante, RcRuc rcRucByNit,
			RcRuc rcRucByNitRepresentante, TbRepresentante tbRepresentante,
			String cusuario, Date firepresentante, Date ffrepresentante,
			Date fhingreso, String nfolio, String cdocAcredita,
			String ndocAcredita, String cdocIdentidad, String ndocIdentidad) {
		this.ircRepresentante = ircRepresentante;
		this.rcRucByNit = rcRucByNit;
		this.rcRucByNitRepresentante = rcRucByNitRepresentante;
		this.tbRepresentante = tbRepresentante;
		this.cusuario = cusuario;
		this.firepresentante = firepresentante;
		this.ffrepresentante = ffrepresentante;
		this.fhingreso = fhingreso;
		this.nfolio = nfolio;
		this.cdocAcredita = cdocAcredita;
		this.ndocAcredita = ndocAcredita;
		
		this.cdocIdentidad = cdocIdentidad;
		this.ndocIdentidad = ndocIdentidad;
	}

	@Id
	@Column(name = "I_RC_REPRESENTANTE", unique = true, nullable = false, precision = 22, scale = 0)
	@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_RC_REPRESENTANTE")
	public Long getIrcRepresentante() {
		return this.ircRepresentante;
	}

	public void setIrcRepresentante(Long ircRepresentante) {
		this.ircRepresentante = ircRepresentante;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false)
	public RcRuc getRcRucByNit() {
		return this.rcRucByNit;
	}

	public void setRcRucByNit(RcRuc rcRucByNit) {
		this.rcRucByNit = rcRucByNit;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "NIT_REPRESENTANTE", nullable = false)
	public RcRuc getRcRucByNitRepresentante() {
		return this.rcRucByNitRepresentante;
	}

	public void setRcRucByNitRepresentante(RcRuc rcRucByNitRepresentante) {
		this.rcRucByNitRepresentante = rcRucByNitRepresentante;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "C_REPRESENTANTE", nullable = false, updatable=false)
	public TbRepresentante getTbRepresentante() {
		return this.tbRepresentante;
	}

	public void setTbRepresentante(TbRepresentante tbRepresentante) {
		this.tbRepresentante = tbRepresentante;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_REPRESENTANTE", nullable = false, updatable=false, length = 7)
	public Date getFirepresentante() {
		return this.firepresentante;
	}

	public void setFirepresentante(Date firepresentante) {
		this.firepresentante = firepresentante;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_REPRESENTANTE", length = 7)
	public Date getFfrepresentante() {
		return this.ffrepresentante;
	}

	public void setFfrepresentante(Date ffrepresentante) {
		this.ffrepresentante = ffrepresentante;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false,updatable=false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Column(name = "N_FOLIO", length = 12)
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

	@Column(name = "C_DOC_ACREDITA", length = 2)
	public String getCdocAcredita() {
		return this.cdocAcredita;
	}

	public void setCdocAcredita(String cdocAcredita) {
		this.cdocAcredita = cdocAcredita;
	}

	@Column(name = "N_DOC_ACREDITA", length = 20)
	public String getNdocAcredita() {
		return this.ndocAcredita;
	}

	public void setNdocAcredita(String ndocAcredita) {
		this.ndocAcredita = ndocAcredita;
	}

	@Column(name = "C_DOC_IDENTIDAD", length = 2)
	public String getCdocIdentidad() {
		return this.cdocIdentidad;
	}

	public void setCdocIdentidad(String cdocIdentidad) {
		this.cdocIdentidad = cdocIdentidad;
	}

	@Column(name = "N_DOC_IDENTIDAD", length = 15)
	public String getNdocIdentidad() {
		return this.ndocIdentidad;
	}

	public void setNdocIdentidad(String ndocIdentidad) {
		this.ndocIdentidad = ndocIdentidad;
	}

}
